<?php
//Svetlana Gornostajeva Student 13, neljapaevati 17.15-21.15, 7.11.2011
include "kalkulaatori_kood.php";
$a = $_POST["a"];
$b = $_POST["b"];
kalkulaator ($a,$b);
?>
<html>
<head>
<title>Kalkulaator</title>
</head>
<body bgcolor=#FFFFFF></body>
<p>
<br>
<form method="post" action="<?php echo $PHP_SELF;?>">
<table border=1>
    <tr>
<td>a :</td>
        <td>
            <input type=text name=a maxlength=10 value=<?php echo $a ?>>
        </td>
    </tr>
<tr>
        <td>b :</td>
        <td>
            <input type=text name=b maxlength=10 value=<?php echo $b ?>>
        </td>
    </tr>
 </table>       
 <input type=submit name=nupp value="Liita"> 
<input type=submit name=nupp value="Lahtuda"> 
<input type=submit name=nupp value="Korruta"> 
<input type=submit name=nupp value="Jagada">
</form>
</html>
<?php
kalkulaator ($a,$b);
print_r($_POST);
?>